home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / DU Folder / Graphics / Sources / Include / GraphicsFrm.h < prev    next >
Encoding:
Text File  |  1995-11-02  |  2.4 KB  |  69 lines  |  [TEXT/MPS ]

  1. //    Copyright © 1995 Apple Computer, Inc. All rights reserved.
  2. //    Release Version:    $ 1.0 d11 $
  3.  
  4. #ifndef _GRAPHICSFRAME_
  5. #define _GRAPHICSFRAME_
  6.  
  7. //=======================================================================
  8. // ----- Framework Includes -----
  9. #ifndef FWFRAME_H
  10. #include <FWFrame.h>        // FW_CFrame
  11. #endif
  12.  
  13. // ----- OS Layer Includes -----
  14. #ifndef FWGC_H
  15. #include "FWGC.h"        // FW_CGraphicContext
  16. #endif
  17.  
  18. //=======================================================================
  19. class FW_CLASS_ATTR CGraphicsPart;
  20. class FW_CLASS_ATTR FW_CLineShape;
  21. class FW_CLASS_ATTR FW_CRegionShape;
  22. class FW_CLASS_ATTR FW_CPolygonShape;
  23. class FW_CLASS_ATTR FW_CPrintHandler;
  24.  
  25. //=======================================================================
  26. class FW_CLASS_ATTR CGraphicsFrame : public FW_CFrame {
  27. public:
  28.                         CGraphicsFrame(Environment* ev, 
  29.                                     ODFrame* odFrame, 
  30.                                     FW_CPresentation* presentation, 
  31.                                     CGraphicsPart* part);
  32.     virtual             ~CGraphicsFrame();
  33. protected:
  34. // overrides
  35.     virtual void        Draw(Environment *ev, 
  36.                              ODFacet* odFacet, 
  37.                              ODShape* invalidShape);
  38.     virtual void        FacetAdded(Environment* ev, ODFacet* facet);
  39.     virtual FW_Boolean     DoMouseDown(Environment* ev, 
  40.                                 const FW_CMouseEvent& theMouseEvent);
  41.  
  42. // ----- Printing ------
  43.     virtual FW_CPrintHandler*    NewPrintHandler(Environment* ev);
  44.     virtual    FW_Boolean            IsCurrentlyPrintable(Environment* ev) const;
  45.     virtual void                GetPrintContentExtent(Environment *ev, FW_CPoint& extent) const;
  46.  
  47. // new methods
  48.     virtual FW_CPictureShape*     MyCreatePictureShape(Environment* ev);
  49.     virtual FW_CPolygonShape*     MyCreatePolygonShape(Environment* ev);
  50.     virtual FW_CLineShape*         MyCreateLineShape(Environment* ev);
  51.     virtual FW_CRegionShape*     MyCreateRegionShape(Environment* ev);
  52.     virtual void         MyDrawBackground(Environment* ev, FW_CGraphicContext& gc);
  53.     virtual void         MyDrawShapes(Environment* ev, FW_CGraphicContext& gc);
  54.     virtual void         MyDrawText(Environment* ev, FW_CGraphicContext& gc);
  55.     virtual void         MyDrawPictures(Environment* ev, FW_CGraphicContext& gc);
  56.     virtual void         MyDrawLine(Environment* ev, FW_CGraphicContext& gc);
  57.     virtual void         MyDrawPolygon(Environment* ev, FW_CGraphicContext& gc);
  58.     virtual void         MyInvalidateLine(Environment* ev);
  59. private:
  60.     FW_CPictureShape*    fLargePictureShape;
  61.     FW_CLineShape*        fLineShape;
  62.     FW_CRegionShape*    fRegionShape;
  63.     FW_CPolygonShape*    fPolygonShape;
  64.     FW_CRect            fLargePictRect;
  65. };
  66.  
  67. //=======================================================================
  68. #endif
  69.